from google.appengine.ext import blobstore
from google.appengine.ext import db


class PATC():
  pass


class SCTC():
  pass

class Membership(db.Model):
  facility = db.IntegerProperty()
  first = db.StringProperty()
  last = db.StringProperty()
  year = db.IntegerProperty()
  email = db.StringProperty()
  url = db.StringProperty()
  address = db.StringProperty()
  city = db.StringProperty()
  state = db.StringProperty()
  zip = db.StringProperty()
  areacode = db.StringProperty()
  phone = db.StringProperty()
  gender = db.StringProperty()
  rating = db.StringProperty()
  netnotes = db.StringProperty()
  oksocial = db.StringProperty()
  interest = db.StringListProperty( )
  help = db.StringListProperty( )

# add these

# ---------------

# interest = db.StringProperty( )
# help = db.StringProperty( )

class _Membership( Membership):
  backup = db.StringProperty()



#class Team(db.Model):
class FacilityTeam(db.Model):
  position = db.IntegerProperty()
  facility = db.IntegerProperty()
  teamid = db.IntegerProperty()
  name = db.StringProperty()
  captain = db.StringProperty()
  page = db.TextProperty()
  updated= db.DateTimeProperty()
  xrosterkey=db.ListProperty(db.Key)


#class Roster(db.Model):
class FacilityRoster(db.Model):
  facility = db.IntegerProperty()
  teamid = db.IntegerProperty()
  playerid = db.IntegerProperty()
  fname = db.StringProperty()
  lname = db.StringProperty()
  roster= db.StringProperty()
  date= db.DateProperty()
  city = db.StringProperty()
  gender = db.StringProperty()
  rating = db.StringProperty()


class Author( db.Model):
  name = db.StringProperty()

#http://www.terminally-incoherent.com/blog/2011/03/28/student-webspace-in-the-cloud-google-app-engine/

class BlobKey(db.Model):
  name = db.StringProperty()
  mykey = blobstore.BlobReferenceProperty( )
  date= db.DateProperty()

#class Player(db.Model):
class FacilityPlayer(db.Model):
  id = db.StringProperty()
  facility = db.IntegerProperty()
  usta = db.StringProperty()
  fname = db.StringProperty()
  lname = db.StringProperty()
  gender = db.StringProperty()
  rating = db.StringProperty()
  city = db.StringProperty()
  ctc = db.StringProperty()
  csc = db.StringProperty()



